<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./js/jquery.js"></script>
    <style>
    </style>
</head>
<body>
    <button>设置属性</button>
    <button>获取属性</button>
    <button>删除属性</button>
    <img class="box"></img>
    <script>
        $(function(){
            $("button").eq(0).click(function(){
                $(".box").attr("src","./images/1.jpg").attr("title","好看的图")
            })
            $("button").eq(1).click(function(){
                console.log($(".box").attr("src"));
            })
            $("button").eq(2).click(function(){
                $(".box").removeAttr("src")
            })
        })
    </script>
</body>
</html>